home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / redakcyjne / programy / PSPad editor 4.5.4 build 2356 beta / pspad454inst_en.exe / {app} / Script / VBScript / PrinAll.vbs < prev   
Text File  |  2008-02-03  |  684b  |  21 lines

  1. ' it will print all open files to printer
  2. const module_name  = "PrintAll"         'this name must be unique !!!
  3. const module_ver   = "0.001a"            'version
  4.  
  5. sub PrintAll
  6.   set obj = NewEditor()
  7.   for i = 0 to editorsCount - 1
  8.       obj.assignEditorByIndex(i)
  9.       if i = 0 then     'for first file we call printer settings dialog
  10.          obj.printFile(True)
  11.       else              'all other files will be printed to selected printer
  12.          obj.printFile(False)
  13.       end if
  14.   next  
  15. end sub
  16.  
  17. ' name "Init" is required, its called automatically during initialization to create menu items
  18. sub Init
  19.   addMenuItem "&Print all files","", "PrintAll"
  20. end sub
  21.